/*
 * Copyright 2018 JDCLOUD.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Data-Centric Audit and Protection API
 * Data-Centric Audit and Protection API
 *
 * OpenAPI spec version: v1
 * Contact: 
 *
 * NOTE: This class is auto generated by the jdcloud code generator program.
 */


using JDCloudSDK.Core.Auth;
using JDCloudSDK.Core.Client;
using JDCloudSDK.Core.Http;
using JDCloudSDK.Dcap.Apis;
using JDCloudSDK.Dcap.Model;
using System;
using System.Collections.Generic;
using System.Text;
#if NET40||NET35
#else
using System.Threading.Tasks;
#endif

namespace JDCloudSDK.Dcap.Client
{
    /// <summary>
    ///  Data-Centric Audit and Protection API
    ///  Data-Centric Audit and Protection API
    ///  Dcap Api 客户端
    ///</summary>
    public class DcapClient : JdcloudClient
    {

        /// <summary>
        ///  默认私有构造函数
        /// </summary>
        private DcapClient()
        {

        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="environment">sdk 环境配置信息</param>
        public DcapClient(CredentialsProvider credentialsProvider, HttpRequestConfig httpRequestConfig,SDKEnvironment environment)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
            this.environment = environment;
        }

        /// <summary>
        /// 默认构造函数
        /// </summary>
        /// <param name="httpRequestConfig">http 客户端配置信息</param>
        /// <param name="credentialsProvider">认证信息</param>
        public DcapClient(CredentialsProvider credentialsProvider,HttpRequestConfig httpRequestConfig)
        {
            this.httpRequestConfig = httpRequestConfig;
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        /// 默认构造函数，
        /// 注意如果使用此方法 httpRequestConfig 使用的http 请求 schema 为Https
        /// </summary>
        /// <param name="credentialsProvider">认证信息</param>
        public DcapClient(CredentialsProvider credentialsProvider)
        {
            this.credentialsProvider = credentialsProvider;
        }

        /// <summary>
        ///  版本号 1.2.3
        ///</summary>
        public const string ClientVersion = "1.2.3";

        private const string apiVersion = "v1";
        private const string userAgentPrefix = "JdcloudSdkDotNet";
        private const string defaultEndpoint = "dcap.jdcloud-api.com";
        private const string serviceName = "dcap";
        private const string userAgent = userAgentPrefix + "/" + ClientVersion + " " + serviceName + "/" + apiVersion;


        private SDKEnvironment environment = new SDKEnvironment(defaultEndpoint);
        private CredentialsProvider credentialsProvider;
        private HttpRequestConfig httpRequestConfig;

        /// <summary>
        ///  获取证书信息
        ///</summary>
        public override CredentialsProvider CredentialsProvider   { get { return credentialsProvider; } }

        /// <summary>
        ///  获取http 客户端配置信息
        ///</summary>
        public override HttpRequestConfig HttpRequestConfig { get { return httpRequestConfig; } }

        /// <summary>
        ///  获取sdk环境配置信息
        ///</summary>
        public override SDKEnvironment SDKEnvironment { get { return environment; } }

        /// <summary>
        ///  获取用户自定义浏览器识别字符串
        ///</summary>
        public override string UserAgent { get { return userAgent; } }

        /// <summary>
        ///  获取服务名称
        ///</summary>
        public override string ServiceName { get { return serviceName; } }

        /// <summary>
        ///  获取版本号
        ///</summary>
        public override string Version { get { return apiVersion; } }



#if NET40||NET35
        /// <summary>
        ///  敏感数据分类列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeCategoryListResponse DescribeCategoryList(DescribeCategoryListRequest request) {
            return  new DescribeCategoryListExecutor().Client(this).Execute<DescribeCategoryListResponse, DescribeCategoryListResult, DescribeCategoryListRequest>(request);
        }
#else
        /// <summary>
        ///  敏感数据分类列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeCategoryListResponse> DescribeCategoryList(DescribeCategoryListRequest request) {
            return await new DescribeCategoryListExecutor().Client(this).Execute<DescribeCategoryListResponse, DescribeCategoryListResult, DescribeCategoryListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyDataTypeResponse ModifyDataType(ModifyDataTypeRequest request) {
            return  new ModifyDataTypeExecutor().Client(this).Execute<ModifyDataTypeResponse, ModifyDataTypeResult, ModifyDataTypeRequest>(request);
        }
#else
        /// <summary>
        ///  修改敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyDataTypeResponse> ModifyDataType(ModifyDataTypeRequest request) {
            return await new ModifyDataTypeExecutor().Client(this).Execute<ModifyDataTypeResponse, ModifyDataTypeResult, ModifyDataTypeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加一条IP白名单记录，CIDR 格式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddIpWhiteItemResponse AddIpWhiteItem(AddIpWhiteItemRequest request) {
            return  new AddIpWhiteItemExecutor().Client(this).Execute<AddIpWhiteItemResponse, AddIpWhiteItemResult, AddIpWhiteItemRequest>(request);
        }
#else
        /// <summary>
        ///  添加一条IP白名单记录，CIDR 格式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddIpWhiteItemResponse> AddIpWhiteItem(AddIpWhiteItemRequest request) {
            return await new AddIpWhiteItemExecutor().Client(this).Execute<AddIpWhiteItemResponse, AddIpWhiteItemResult, AddIpWhiteItemRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取应用列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeAppListResponse DescribeAppList(DescribeAppListRequest request) {
            return  new DescribeAppListExecutor().Client(this).Execute<DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request);
        }
#else
        /// <summary>
        ///  获取应用列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeAppListResponse> DescribeAppList(DescribeAppListRequest request) {
            return await new DescribeAppListExecutor().Client(this).Execute<DescribeAppListResponse, DescribeAppListResult, DescribeAppListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除一条IP白名单
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteIpWhiteItemResponse DeleteIpWhiteItem(DeleteIpWhiteItemRequest request) {
            return  new DeleteIpWhiteItemExecutor().Client(this).Execute<DeleteIpWhiteItemResponse, DeleteIpWhiteItemResult, DeleteIpWhiteItemRequest>(request);
        }
#else
        /// <summary>
        ///  删除一条IP白名单
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteIpWhiteItemResponse> DeleteIpWhiteItem(DeleteIpWhiteItemRequest request) {
            return await new DeleteIpWhiteItemExecutor().Client(this).Execute<DeleteIpWhiteItemResponse, DeleteIpWhiteItemResult, DeleteIpWhiteItemRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改字段标签,不传则清空标签
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyDataSourceTableFieldTagResponse ModifyDataSourceTableFieldTag(ModifyDataSourceTableFieldTagRequest request) {
            return  new ModifyDataSourceTableFieldTagExecutor().Client(this).Execute<ModifyDataSourceTableFieldTagResponse, ModifyDataSourceTableFieldTagResult, ModifyDataSourceTableFieldTagRequest>(request);
        }
#else
        /// <summary>
        ///  修改字段标签,不传则清空标签
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyDataSourceTableFieldTagResponse> ModifyDataSourceTableFieldTag(ModifyDataSourceTableFieldTagRequest request) {
            return await new ModifyDataSourceTableFieldTagExecutor().Client(this).Execute<ModifyDataSourceTableFieldTagResponse, ModifyDataSourceTableFieldTagResult, ModifyDataSourceTableFieldTagRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改实例名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyInstanceNameResponse ModifyInstanceName(ModifyInstanceNameRequest request) {
            return  new ModifyInstanceNameExecutor().Client(this).Execute<ModifyInstanceNameResponse, ModifyInstanceNameResult, ModifyInstanceNameRequest>(request);
        }
#else
        /// <summary>
        ///  修改实例名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyInstanceNameResponse> ModifyInstanceName(ModifyInstanceNameRequest request) {
            return await new ModifyInstanceNameExecutor().Client(this).Execute<ModifyInstanceNameResponse, ModifyInstanceNameResult, ModifyInstanceNameRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置透传模式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetInstanceByPassModeResponse SetInstanceByPassMode(SetInstanceByPassModeRequest request) {
            return  new SetInstanceByPassModeExecutor().Client(this).Execute<SetInstanceByPassModeResponse, SetInstanceByPassModeResult, SetInstanceByPassModeRequest>(request);
        }
#else
        /// <summary>
        ///  设置透传模式
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetInstanceByPassModeResponse> SetInstanceByPassMode(SetInstanceByPassModeRequest request) {
            return await new SetInstanceByPassModeExecutor().Client(this).Execute<SetInstanceByPassModeResponse, SetInstanceByPassModeResult, SetInstanceByPassModeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取实例详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeInstanceResponse DescribeInstance(DescribeInstanceRequest request) {
            return  new DescribeInstanceExecutor().Client(this).Execute<DescribeInstanceResponse, DescribeInstanceResult, DescribeInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  获取实例详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeInstanceResponse> DescribeInstance(DescribeInstanceRequest request) {
            return await new DescribeInstanceExecutor().Client(this).Execute<DescribeInstanceResponse, DescribeInstanceResult, DescribeInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取数据源详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataSourceResponse DescribeDataSource(DescribeDataSourceRequest request) {
            return  new DescribeDataSourceExecutor().Client(this).Execute<DescribeDataSourceResponse, DescribeDataSourceResult, DescribeDataSourceRequest>(request);
        }
#else
        /// <summary>
        ///  获取数据源详情
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataSourceResponse> DescribeDataSource(DescribeDataSourceRequest request) {
            return await new DescribeDataSourceExecutor().Client(this).Execute<DescribeDataSourceResponse, DescribeDataSourceResult, DescribeDataSourceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  敏感数据分级列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeLevelListResponse DescribeLevelList(DescribeLevelListRequest request) {
            return  new DescribeLevelListExecutor().Client(this).Execute<DescribeLevelListResponse, DescribeLevelListResult, DescribeLevelListRequest>(request);
        }
#else
        /// <summary>
        ///  敏感数据分级列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeLevelListResponse> DescribeLevelList(DescribeLevelListRequest request) {
            return await new DescribeLevelListExecutor().Client(this).Execute<DescribeLevelListResponse, DescribeLevelListResult, DescribeLevelListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除数据源-表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteDataSourceTableResponse DeleteDataSourceTable(DeleteDataSourceTableRequest request) {
            return  new DeleteDataSourceTableExecutor().Client(this).Execute<DeleteDataSourceTableResponse, DeleteDataSourceTableResult, DeleteDataSourceTableRequest>(request);
        }
#else
        /// <summary>
        ///  删除数据源-表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteDataSourceTableResponse> DeleteDataSourceTable(DeleteDataSourceTableRequest request) {
            return await new DeleteDataSourceTableExecutor().Client(this).Execute<DeleteDataSourceTableResponse, DeleteDataSourceTableResult, DeleteDataSourceTableRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  增加敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateDataTypeResponse CreateDataType(CreateDataTypeRequest request) {
            return  new CreateDataTypeExecutor().Client(this).Execute<CreateDataTypeResponse, CreateDataTypeResult, CreateDataTypeRequest>(request);
        }
#else
        /// <summary>
        ///  增加敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateDataTypeResponse> CreateDataType(CreateDataTypeRequest request) {
            return await new CreateDataTypeExecutor().Client(this).Execute<CreateDataTypeResponse, CreateDataTypeResult, CreateDataTypeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteDataTypeResponse DeleteDataType(DeleteDataTypeRequest request) {
            return  new DeleteDataTypeExecutor().Client(this).Execute<DeleteDataTypeResponse, DeleteDataTypeResult, DeleteDataTypeRequest>(request);
        }
#else
        /// <summary>
        ///  删除敏感数据类型
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteDataTypeResponse> DeleteDataType(DeleteDataTypeRequest request) {
            return await new DeleteDataTypeExecutor().Client(this).Execute<DeleteDataTypeResponse, DeleteDataTypeResult, DeleteDataTypeRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateDataSourceTableResponse CreateDataSourceTable(CreateDataSourceTableRequest request) {
            return  new CreateDataSourceTableExecutor().Client(this).Execute<CreateDataSourceTableResponse, CreateDataSourceTableResult, CreateDataSourceTableRequest>(request);
        }
#else
        /// <summary>
        ///  创建表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateDataSourceTableResponse> CreateDataSourceTable(CreateDataSourceTableRequest request) {
            return await new CreateDataSourceTableExecutor().Client(this).Execute<CreateDataSourceTableResponse, CreateDataSourceTableResult, CreateDataSourceTableRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  新建数据源-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateDataSourceTableFieldResponse CreateDataSourceTableField(CreateDataSourceTableFieldRequest request) {
            return  new CreateDataSourceTableFieldExecutor().Client(this).Execute<CreateDataSourceTableFieldResponse, CreateDataSourceTableFieldResult, CreateDataSourceTableFieldRequest>(request);
        }
#else
        /// <summary>
        ///  新建数据源-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateDataSourceTableFieldResponse> CreateDataSourceTableField(CreateDataSourceTableFieldRequest request) {
            return await new CreateDataSourceTableFieldExecutor().Client(this).Execute<CreateDataSourceTableFieldResponse, CreateDataSourceTableFieldResult, CreateDataSourceTableFieldRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  创建实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateInstanceResponse CreateInstance(CreateInstanceRequest request) {
            return  new CreateInstanceExecutor().Client(this).Execute<CreateInstanceResponse, CreateInstanceResult, CreateInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  创建实例
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateInstanceResponse> CreateInstance(CreateInstanceRequest request) {
            return await new CreateInstanceExecutor().Client(this).Execute<CreateInstanceResponse, CreateInstanceResult, CreateInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取数据源列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataSourceListResponse DescribeDataSourceList(DescribeDataSourceListRequest request) {
            return  new DescribeDataSourceListExecutor().Client(this).Execute<DescribeDataSourceListResponse, DescribeDataSourceListResult, DescribeDataSourceListRequest>(request);
        }
#else
        /// <summary>
        ///  获取数据源列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataSourceListResponse> DescribeDataSourceList(DescribeDataSourceListRequest request) {
            return await new DescribeDataSourceListExecutor().Client(this).Execute<DescribeDataSourceListResponse, DescribeDataSourceListResult, DescribeDataSourceListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取元数据-表-字段 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataSourceTableFieldListResponse DescribeDataSourceTableFieldList(DescribeDataSourceTableFieldListRequest request) {
            return  new DescribeDataSourceTableFieldListExecutor().Client(this).Execute<DescribeDataSourceTableFieldListResponse, DescribeDataSourceTableFieldListResult, DescribeDataSourceTableFieldListRequest>(request);
        }
#else
        /// <summary>
        ///  获取元数据-表-字段 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataSourceTableFieldListResponse> DescribeDataSourceTableFieldList(DescribeDataSourceTableFieldListRequest request) {
            return await new DescribeDataSourceTableFieldListExecutor().Client(this).Execute<DescribeDataSourceTableFieldListResponse, DescribeDataSourceTableFieldListResult, DescribeDataSourceTableFieldListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取元数据-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataSourceTableFieldResponse DescribeDataSourceTableField(DescribeDataSourceTableFieldRequest request) {
            return  new DescribeDataSourceTableFieldExecutor().Client(this).Execute<DescribeDataSourceTableFieldResponse, DescribeDataSourceTableFieldResult, DescribeDataSourceTableFieldRequest>(request);
        }
#else
        /// <summary>
        ///  获取元数据-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataSourceTableFieldResponse> DescribeDataSourceTableField(DescribeDataSourceTableFieldRequest request) {
            return await new DescribeDataSourceTableFieldExecutor().Client(this).Execute<DescribeDataSourceTableFieldResponse, DescribeDataSourceTableFieldResult, DescribeDataSourceTableFieldRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除数据源
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteDataSourceResponse DeleteDataSource(DeleteDataSourceRequest request) {
            return  new DeleteDataSourceExecutor().Client(this).Execute<DeleteDataSourceResponse, DeleteDataSourceResult, DeleteDataSourceRequest>(request);
        }
#else
        /// <summary>
        ///  删除数据源
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteDataSourceResponse> DeleteDataSource(DeleteDataSourceRequest request) {
            return await new DeleteDataSourceExecutor().Client(this).Execute<DeleteDataSourceResponse, DeleteDataSourceResult, DeleteDataSourceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取元数据-表 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataSourceTableListResponse DescribeDataSourceTableList(DescribeDataSourceTableListRequest request) {
            return  new DescribeDataSourceTableListExecutor().Client(this).Execute<DescribeDataSourceTableListResponse, DescribeDataSourceTableListResult, DescribeDataSourceTableListRequest>(request);
        }
#else
        /// <summary>
        ///  获取元数据-表 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataSourceTableListResponse> DescribeDataSourceTableList(DescribeDataSourceTableListRequest request) {
            return await new DescribeDataSourceTableListExecutor().Client(this).Execute<DescribeDataSourceTableListResponse, DescribeDataSourceTableListResult, DescribeDataSourceTableListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加数据源
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public CreateDataSourceResponse CreateDataSource(CreateDataSourceRequest request) {
            return  new CreateDataSourceExecutor().Client(this).Execute<CreateDataSourceResponse, CreateDataSourceResult, CreateDataSourceRequest>(request);
        }
#else
        /// <summary>
        ///  添加数据源
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<CreateDataSourceResponse> CreateDataSource(CreateDataSourceRequest request) {
            return await new CreateDataSourceExecutor().Client(this).Execute<CreateDataSourceResponse, CreateDataSourceResult, CreateDataSourceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改敏感数据分类名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyCategoryResponse ModifyCategory(ModifyCategoryRequest request) {
            return  new ModifyCategoryExecutor().Client(this).Execute<ModifyCategoryResponse, ModifyCategoryResult, ModifyCategoryRequest>(request);
        }
#else
        /// <summary>
        ///  修改敏感数据分类名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyCategoryResponse> ModifyCategory(ModifyCategoryRequest request) {
            return await new ModifyCategoryExecutor().Client(this).Execute<ModifyCategoryResponse, ModifyCategoryResult, ModifyCategoryRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取敏感数据类型列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeDataTypeListResponse DescribeDataTypeList(DescribeDataTypeListRequest request) {
            return  new DescribeDataTypeListExecutor().Client(this).Execute<DescribeDataTypeListResponse, DescribeDataTypeListResult, DescribeDataTypeListRequest>(request);
        }
#else
        /// <summary>
        ///  获取敏感数据类型列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeDataTypeListResponse> DescribeDataTypeList(DescribeDataTypeListRequest request) {
            return await new DescribeDataTypeListExecutor().Client(this).Execute<DescribeDataTypeListResponse, DescribeDataTypeListResult, DescribeDataTypeListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取此实例的所有IP白名单列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeIpWhiteListResponse DescribeIpWhiteList(DescribeIpWhiteListRequest request) {
            return  new DescribeIpWhiteListExecutor().Client(this).Execute<DescribeIpWhiteListResponse, DescribeIpWhiteListResult, DescribeIpWhiteListRequest>(request);
        }
#else
        /// <summary>
        ///  获取此实例的所有IP白名单列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeIpWhiteListResponse> DescribeIpWhiteList(DescribeIpWhiteListRequest request) {
            return await new DescribeIpWhiteListExecutor().Client(this).Execute<DescribeIpWhiteListResponse, DescribeIpWhiteListResult, DescribeIpWhiteListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  修改敏感数据分级策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyLevelResponse ModifyLevel(ModifyLevelRequest request) {
            return  new ModifyLevelExecutor().Client(this).Execute<ModifyLevelResponse, ModifyLevelResult, ModifyLevelRequest>(request);
        }
#else
        /// <summary>
        ///  修改敏感数据分级策略
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyLevelResponse> ModifyLevel(ModifyLevelRequest request) {
            return await new ModifyLevelExecutor().Client(this).Execute<ModifyLevelResponse, ModifyLevelResult, ModifyLevelRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除实例 [MFA enabled]
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteInstanceResponse DeleteInstance(DeleteInstanceRequest request) {
            return  new DeleteInstanceExecutor().Client(this).Execute<DeleteInstanceResponse, DeleteInstanceResult, DeleteInstanceRequest>(request);
        }
#else
        /// <summary>
        ///  删除实例 [MFA enabled]
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteInstanceResponse> DeleteInstance(DeleteInstanceRequest request) {
            return await new DeleteInstanceExecutor().Client(this).Execute<DeleteInstanceResponse, DeleteInstanceResult, DeleteInstanceRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除数据源-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteDataSourceTableFieldResponse DeleteDataSourceTableField(DeleteDataSourceTableFieldRequest request) {
            return  new DeleteDataSourceTableFieldExecutor().Client(this).Execute<DeleteDataSourceTableFieldResponse, DeleteDataSourceTableFieldResult, DeleteDataSourceTableFieldRequest>(request);
        }
#else
        /// <summary>
        ///  删除数据源-表-字段
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteDataSourceTableFieldResponse> DeleteDataSourceTableField(DeleteDataSourceTableFieldRequest request) {
            return await new DeleteDataSourceTableFieldExecutor().Client(this).Execute<DeleteDataSourceTableFieldResponse, DeleteDataSourceTableFieldResult, DeleteDataSourceTableFieldRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  删除敏感数据分类
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DeleteCategoryResponse DeleteCategory(DeleteCategoryRequest request) {
            return  new DeleteCategoryExecutor().Client(this).Execute<DeleteCategoryResponse, DeleteCategoryResult, DeleteCategoryRequest>(request);
        }
#else
        /// <summary>
        ///  删除敏感数据分类
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DeleteCategoryResponse> DeleteCategory(DeleteCategoryRequest request) {
            return await new DeleteCategoryExecutor().Client(this).Execute<DeleteCategoryResponse, DeleteCategoryResult, DeleteCategoryRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  添加敏感数据分类
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public AddCategoryResponse AddCategory(AddCategoryRequest request) {
            return  new AddCategoryExecutor().Client(this).Execute<AddCategoryResponse, AddCategoryResult, AddCategoryRequest>(request);
        }
#else
        /// <summary>
        ///  添加敏感数据分类
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<AddCategoryResponse> AddCategory(AddCategoryRequest request) {
            return await new AddCategoryExecutor().Client(this).Execute<AddCategoryResponse, AddCategoryResult, AddCategoryRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  更新数据源名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public UpdateDataSourceNameResponse UpdateDataSourceName(UpdateDataSourceNameRequest request) {
            return  new UpdateDataSourceNameExecutor().Client(this).Execute<UpdateDataSourceNameResponse, UpdateDataSourceNameResult, UpdateDataSourceNameRequest>(request);
        }
#else
        /// <summary>
        ///  更新数据源名称
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<UpdateDataSourceNameResponse> UpdateDataSourceName(UpdateDataSourceNameRequest request) {
            return await new UpdateDataSourceNameExecutor().Client(this).Execute<UpdateDataSourceNameResponse, UpdateDataSourceNameResult, UpdateDataSourceNameRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置数据源的密钥及加密算法
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetDataSourceKmsResponse SetDataSourceKms(SetDataSourceKmsRequest request) {
            return  new SetDataSourceKmsExecutor().Client(this).Execute<SetDataSourceKmsResponse, SetDataSourceKmsResult, SetDataSourceKmsRequest>(request);
        }
#else
        /// <summary>
        ///  设置数据源的密钥及加密算法
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetDataSourceKmsResponse> SetDataSourceKms(SetDataSourceKmsRequest request) {
            return await new SetDataSourceKmsExecutor().Client(this).Execute<SetDataSourceKmsResponse, SetDataSourceKmsResult, SetDataSourceKmsRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  插件获取配置文件
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeInstanceConfigResponse DescribeInstanceConfig(DescribeInstanceConfigRequest request) {
            return  new DescribeInstanceConfigExecutor().Client(this).Execute<DescribeInstanceConfigResponse, DescribeInstanceConfigResult, DescribeInstanceConfigRequest>(request);
        }
#else
        /// <summary>
        ///  插件获取配置文件
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeInstanceConfigResponse> DescribeInstanceConfig(DescribeInstanceConfigRequest request) {
            return await new DescribeInstanceConfigExecutor().Client(this).Execute<DescribeInstanceConfigResponse, DescribeInstanceConfigResult, DescribeInstanceConfigRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  获取实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public DescribeInstanceListResponse DescribeInstanceList(DescribeInstanceListRequest request) {
            return  new DescribeInstanceListExecutor().Client(this).Execute<DescribeInstanceListResponse, DescribeInstanceListResult, DescribeInstanceListRequest>(request);
        }
#else
        /// <summary>
        ///  获取实例列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<DescribeInstanceListResponse> DescribeInstanceList(DescribeInstanceListRequest request) {
            return await new DescribeInstanceListExecutor().Client(this).Execute<DescribeInstanceListResponse, DescribeInstanceListResult, DescribeInstanceListRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  生成DDL语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public GenerateDataSourceDDLResponse GenerateDataSourceDDL(GenerateDataSourceDDLRequest request) {
            return  new GenerateDataSourceDDLExecutor().Client(this).Execute<GenerateDataSourceDDLResponse, GenerateDataSourceDDLResult, GenerateDataSourceDDLRequest>(request);
        }
#else
        /// <summary>
        ///  生成DDL语句
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<GenerateDataSourceDDLResponse> GenerateDataSourceDDL(GenerateDataSourceDDLRequest request) {
            return await new GenerateDataSourceDDLExecutor().Client(this).Execute<GenerateDataSourceDDLResponse, GenerateDataSourceDDLResult, GenerateDataSourceDDLRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  配置数据源-表-字段 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public ModifyDataSourceTableFieldResponse ModifyDataSourceTableField(ModifyDataSourceTableFieldRequest request) {
            return  new ModifyDataSourceTableFieldExecutor().Client(this).Execute<ModifyDataSourceTableFieldResponse, ModifyDataSourceTableFieldResult, ModifyDataSourceTableFieldRequest>(request);
        }
#else
        /// <summary>
        ///  配置数据源-表-字段 列表
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<ModifyDataSourceTableFieldResponse> ModifyDataSourceTableField(ModifyDataSourceTableFieldRequest request) {
            return await new ModifyDataSourceTableFieldExecutor().Client(this).Execute<ModifyDataSourceTableFieldResponse, ModifyDataSourceTableFieldResult, ModifyDataSourceTableFieldRequest>(request).ConfigureAwait(false);
        }
#endif
#if NET40||NET35
        /// <summary>
        ///  设置实例的访问凭证 AK+SK
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public SetInstanceAccessKeyResponse SetInstanceAccessKey(SetInstanceAccessKeyRequest request) {
            return  new SetInstanceAccessKeyExecutor().Client(this).Execute<SetInstanceAccessKeyResponse, SetInstanceAccessKeyResult, SetInstanceAccessKeyRequest>(request);
        }
#else
        /// <summary>
        ///  设置实例的访问凭证 AK+SK
        /// </summary>
        /// <param name="request">请求参数信息</param>
        /// <returns>请求结果信息</returns>
        public async Task<SetInstanceAccessKeyResponse> SetInstanceAccessKey(SetInstanceAccessKeyRequest request) {
            return await new SetInstanceAccessKeyExecutor().Client(this).Execute<SetInstanceAccessKeyResponse, SetInstanceAccessKeyResult, SetInstanceAccessKeyRequest>(request).ConfigureAwait(false);
        }
#endif

            /// <summary>
            ///  默认DcapClient 构造器 接口
            ///</summary>
            public interface Builder
            {

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>dcapClient 构造器</returns>
                Builder CredentialsProvider(CredentialsProvider provider);

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>dcapClient 构造器</returns>
                Builder Environment(Core.Client.SDKEnvironment environment);

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>dcapClient 构造器</returns>
                Builder HttpRequestConfig(HttpRequestConfig config);

                /// <summary>
                ///  构造DcapClient 对象
                ///</summary>
                DcapClient Build();
            }

            /// <summary>
            ///  默认DcapClient 构造器
            ///</summary>
            public class DefaultBuilder : Builder
            {
                /// <summary>
                ///  DcapClient service client
                /// </summary>
                private  DcapClient dcapClient;

                /// <summary>
                ///  默认DcapClient 构造器构造对象
                ///</summary>
                public DefaultBuilder()
                {
                    dcapClient = new DcapClient();
                }

                /// <summary>
                ///  构造DcapClient 对象
                ///</summary>
                public DcapClient Build()
                {
                    if (dcapClient.CredentialsProvider == null)
                    {
                        //if credentialsProvider not set, try load jdcloud global default  credentials provider
                        dcapClient.credentialsProvider = JdCloud.DefaultInstance.GetCredentialsProvider();
                        if (dcapClient.credentialsProvider == null)
                        {
                            throw new ArgumentNullException("DcapClient build error: jdcloud credentials provider not set");
                        }
                    }
                    if (dcapClient.HttpRequestConfig == null)
                    {
                        dcapClient.httpRequestConfig = JdCloud.DefaultInstance.GetHttpRequestConfig();
                        if (dcapClient.httpRequestConfig == null)
                        {
                        throw new ArgumentNullException("DcapClient build error: http request config not set");
                        }
                    }
                    return dcapClient;
                }

                /// <summary>
                /// 设置认证信息参数
                /// </summary>
                /// <param name="provider">认证信息提供对象</param>
                /// <returns>dcapClient 构造器</returns>
                public Builder CredentialsProvider(CredentialsProvider provider)
                {
                    dcapClient.credentialsProvider = provider;
                    return this;
                }

                /// <summary>
                /// 设置请求环境参数
                /// </summary>
                /// <param name="environment">环境参数信息</param>
                /// <returns>dcapClient 构造器</returns>
                public Builder Environment(SDKEnvironment environment)
                {
                    dcapClient.environment = environment;
                    return this;
                }

                /// <summary>
                /// http 请求配置信息
                /// </summary>
                /// <param name="config">http 请求配置信息</param>
                /// <returns>dcapClient 构造器</returns>
                public Builder HttpRequestConfig(HttpRequestConfig config)
                {
                    dcapClient.httpRequestConfig = config;
                    return this;
                }
            }
    }
}
